1. Field of the Invention
The present invention relates generally to memory devices. In particular, the present invention relates to achieving a high throughput in a storage cache application using a flash solid state disk.
2. Background of the Invention
The use of Flash memory in storage has mushroomed in the last few years with flash memory pricing dropping below that of DRAM. Flash memory is usually deployed as a disk replacement in the form of a solid state disk (SSD) in markets where performance is critical. SSD is still more expensive by an order of magnitude compared with hard disk drives. A more cost effective solution is to exploit the relative low cost of Flash memory compared with DRAM by augmenting the DRAM cache in a storage controller with Flash memory. As a substitute or as a supplement to DRAM, the performance of Flash memory degrades when write locations are random, which is a typical occurrence in a caching environment. This degradation in performance is generally caused by Write Amplification.
In a SSD, Write Amplification is the result of Flash memory's resistance to being rewritten in place. With Flash memory, a block must be erased first before it can be written again. So, an update to a memory location is written in a different block while the original data is marked invalid. Eventually, invalid data appear in many different blocks in the SSD, simply taking up space and not providing any benefit to the SSD. In order to reclaim memory for new data, the blocks need to be erased prior to a writing operation. If the entire block contains nothing but invalid data, then the block can be erased quickly. However, if there are still valid data present in the block, they must be moved to another location before the block can be erased. Identifying blocks to be erased and relocating valid data in those blocks is a process known as garbage collection.
Typically, at least 20% of the actual available memory of a SSD is reserved for garbage collection. This means that when the SSD reaches its reported (perceived) capacity, 20% of the data are presumably invalid. Assuming even distribution for random workloads, on average this means that 80% of each erasable block contains valid data that must be relocated. Accordingly, to reclaim one erase block in order to write new data, valid data from five blocks have to be read and relocated to four other blocks. This process, in which a write operation may trigger multiple read/write operations, is known as Write Amplification. The amount of work required is inversely proportional to the amount of reserved space in the SSD. Since Write Performance hurts overall sustained throughput, some SSD vendors recommend reserving 50% of available memory if the SSD is to be used for random write workload most of the time. Some memory devices, such as NAND flash memory devices, possess finite write/erase endurance and/or limited data retention. Tracking the write/erase endurance and data retention is often desired to recognize a current usefulness and reliability of such memory.